package ruifeng.zcj.happymahjony;

import android.app.Activity;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.SoundPool;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;

/**
 * 作者：郑朝军 on 2016/11/7 09:58
 * 邮箱：1250393285@qq.com
 * 公司：武汉润丰壹网信息科技有限公司
 */

public class testVideo extends Activity{
    public WebSettings ws;
    public WebView mWebview;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.test);
        mWebview = (WebView) findViewById(R.id.webview);
        ws = mWebview.getSettings();
        ws.setJavaScriptEnabled(true);

        ws.setAppCacheEnabled(true);
        ws.setSupportZoom(false);
        ws.setUseWideViewPort(true);// 可任意比例缩放
        ws.setJavaScriptCanOpenWindowsAutomatically(true);// js支持
        ws.setDomStorageEnabled(true);

        mWebview.loadUrl("file:///android_asset/www/html/test.html");



        MediaPlayer mediaPlayer = MediaPlayer.create(getApplicationContext(), R.raw.bgm);
        mediaPlayer.start();
        mediaPlayer.setLooping(true);



    }
}
